UNPKG
@thunderstorefront/api-mock
Version:
latest (0.3.1)
0.3.1
0.3.0
0.2.2
0.2.1
0.2.0
0.1.0
0.0.4
0.0.3
0.0.2
0.0.1
Create Nuxt extendable layer with this GitHub template.
@thunderstorefront/api-mock
/
server
/
api
/
store
/
config
/
[id].get.ts
7 lines
(5 loc)
•
196 B
text/typescript
View Raw
1
2
3
4
5
6
7
import
{ stores }
from
'../../../data/stores'
;
export
default
defineEventHandler
(
(
event
) =>
{
const
id =
getRouterParam
(event,
'id'
);
return
stores.
find
(
(
store
) =>
store.
storeId
=== id); });